home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / demo / mag / gods-disc12.lha / D.I.S.C.12 / text / thescene-backtoschool < prev    next >
Encoding:
Text File  |  1980-03-22  |  2.1 KB  |  54 lines

  1. discnew.font,8
  2. «s6=166,227,181»
  3. «s7=191,206,254»
  4. «»
  5. «c2»«ac»BACK TO SCHOOL«»
  6. «»
  7. «c1»By Krabob/Mankind«»
  8. «»
  9. «as»«c6»A quick help for those coders who still don't know how to use the OS.«»
  10. «»
  11. «c7»If there are some Asm coders that don't even know how a ".library" shared
  12. library works,
  13. (I know there are:I was one for a long time.) I'd like to say them that it's
  14. easy and clear to use: I can tell you quicly that:«»
  15. «»
  16. each ".library" in LIBS: and in the roms, contains «c6»many system functions.
  17. «c7»To use a library, you must open it at the start , end close it before you quit
  18. your program.«»
  19. «»
  20. to open a library, you must only know its name and the minimal number
  21. version needed.
  22. the opening give you the "base" of it: The pointer where it begins.
  23. Keep it. Then put it in a6.
  24. By knowing the «c6»"offset" «c7»of a function in a library, you can throw a function
  25. with jsr (JumpSubRoutine) you can pass parameters in and out, with the
  26. registers designed by the function. (see the library autodoc for the description!)
  27. the files in the directory "include:" contains all the offset needed, and also
  28. macro and system tags, which make the «c6»source very clear.
  29. «c7»that example shut all screens: (and reset aga register too.)«»
  30. «»
  31. «al»        «c6»include "include:graphics/graphics_lib.i"    «»
  32.         ...«»
  33.   move.l  Gfxbase,a6«»
  34.   ;get graphics.library Base previously opened.«»
  35.   move.l  #0,a0«»
  36.   ;parameter=0.«» 
  37.   jsr     _LVOLoadView(a6)«»
  38.   ; what jammie should do at start :-)«»
  39.   ;Throw graphics.library/Loadview«»
  40. «as»«»       
  41. «c7»The exec.library is the first opened library at hard boot, and can't be closed:
  42. you can get its base from the absolute 4bytes address "4.l" (execbase)
  43. it contains the «c6»functions to open and close other libraries.«»
  44. «»
  45. «c7»A last thing:
  46. Some documentation named the «c6»"Autodocs" «c7»contains the list of all function 
  47. of all standard library. A .library should always come with its ".i" too.
  48. Ahhh... the best is always to get a code example and make it work.«»
  49. «»
  50. «c6»Please notice that this article actually was written for D.I.S.C. #11, but
  51. due to some mistakes we forget to include it. Apologize to Krabob!«»
  52. «»  
  53. «e»
  54.